#!/bin/sh

read -p "username: " username
stty -echo
read -p "password: " password
stty echo
echo ''

creds="-h localhost --username=$username"

PGPASSWORD=$password

db=test

psql $db $creds -f drop.sql
psql $db $creds -f schema.sql
psql $db $creds -f init.sql
psql $db $creds -f test.sql
psql $creds $db -f data.sql